package com.kgc.service.impl;

import com.kgc.dao.UserMapper;
import com.kgc.dao.UserMapperEx;
import com.kgc.pojo.User;
import com.kgc.pojo.UserEx;
import com.kgc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceimpl implements UserService {
    @Autowired
    private UserMapperEx userMapperEx;
    @Autowired
    private UserMapper userMapper;
    @Override
    public User userLoginByPhon(String phoneNum, String password) {
        List<User> list=userMapperEx.userLoginByPhon(phoneNum,password);
        if(list!=null&&list.size()>0){
            return list.get(0);
        }
        return null;
    }
}
